package com.lq.memo.controller;

import com.lq.memo.entity.Memo;
import com.lq.memo.entity.MyResponse;
import com.lq.memo.service.MemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: memo
 * @description:
 * @author: LQ
 * @create: 2021-12-30 09:51
 */
@RestController
@RequestMapping("/memo")
public class MemoController {

    @Autowired
    MemoService memoService;

    @PostMapping("/saveOrUpdateMemo")
    public MyResponse saveOrUpdateMemo(@RequestBody Memo memo){
        memoService.saveOrUpdateMemo(memo);
        return new MyResponse().success();
    }
}
